<div id="versioning_display" class="tab-pane">
  <h2>Versions</h2>
  <%= simple_form_for [main_app, curation_concern], html: { multipart: true } do |f| %>
    <%= hidden_field_tag('redirect_tab', 'versions') %>
    <h3>Upload New Version</h3>
    <%= f.input :files, as: :multifile, wrapper: :vertical_file_input, required: true %>
    <%= f.button :button, name: "update_versioning", id: "upload_submit", onclick: "confirmation_needed = false;", class: "btn btn-primary" do %>
<i class="glyphicon glyphicon-upload"></i> Upload New Version
<% end %>
  <% end %>

  <%= form_for [main_app, curation_concern],
               html: { class: 'edit_file_set_previous_version' } do |f| %>
    <h3>Restore Previous Version</h3>
    <% @version_list.each do |version| %>
      <div class="radio">
        <label class="radio <%= version.current? ? 'disabled' : '' %>">
          <%= radio_button_tag(:revision, version.label, false, disabled: version.current?, required: 'required') %>
          <%= version.current? ? 'Current version:' : 'Restore from' %>
          <%= version.created %> [by <%= version.committer %>]
        </label>
      </div>
    <% end %>
    <div id="save_version_note" class="alert hide">You must click &quot;Save Revision&quot; to revert a previous version of this file</div>
    <%= f.button '<i class="glyphicon glyphicon-save"></i> Save Revision'.html_safe, type: 'submit', class: 'btn btn-primary', onclick: "confirmation_needed = false;", name: "revert_submit", id: "revert_submit" %>
  <% end %>
</div> <!-- /row -->
